<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
	<f:view>
		<h:form id="form" >
			<p:menubar style="max-width:755px;max-height:24px;min-height:24px; width:755px;">
				<p:submenu label="Animal">
					<p:menuitem value="Alterar" action="#{animalManager.prepareUpdate}" update="form"/>
					<p:menuitem value="Reabri Prontuário" action="#{medicoManager.reabrirProntuario}" 
						update=":form" disabled="#{!medicoManager.podeReabrirFicha(medicoManager.agendamento)}"/>
				</p:submenu>
				<p:submenu label="Documentos">
					<p:menuitem value="Imprimir Receita" actionListener="#{medicoManager.printReceita}" target="_blank" ajax="false"/>
					<p:menuitem value="Imprimir Declaração" />
					<p:menuitem value="Imprimir Atestado" />
				</p:submenu>
				<p:submenu label="Arquivos">
					<p:menuitem value="Upload de Arquivos" />
				</p:submenu>
			</p:menubar>
			
			<h:panelGroup id="panel_paciente" rendered="#{medicoManager.renderPanelPaciente}">
				<ui:include src="/veterinaria/paginas/animal/animal.xhtml"></ui:include>
				<p:commandButton action="#{medicoManager.updatePacienteAnimal}" value="Atualizar Animal" update="form, :form_consulta" rendered="#{medicoManager.renderPanelPaciente}"/>
			</h:panelGroup>
			
			<h:panelGroup rendered="#{!medicoManager.renderPanelPaciente}">
				<ui:include src="/veterinaria/paginas/animal/ficha.xhtml"></ui:include>
			</h:panelGroup>
		</h:form>
	</f:view>
</html>